package com.example.ccjml;

import android.os.Bundle;
import android.view.View;

import androidx.annotation.Nullable;

import com.example.ccj.b.a.BaseActivity;
import com.example.ccj.b.c.custom.MButton;
import com.example.ccj.b.c.custom.SelectPictureMode;
import com.example.ccj.b.c.custom.TransverseLoadImageControl;

/**
 * 测试添加图片控件
 */
public class TestAddImageActivity extends BaseActivity {


    TransverseLoadImageControl control;
    MButton mBtnModifyMode,mBtnModifyIsCanDelete,mBtnModifyModeOnOneSelect;

    @Override
    public void initData(@Nullable Bundle bundle) {
        control.setCanDelete(true);
        mBtnModifyMode.setOnClickListener(v -> control.setMode(SelectPictureMode.pickMultiplePictureOrCamera));
        mBtnModifyIsCanDelete.setOnClickListener(v -> control.setCanDelete(false));
        mBtnModifyModeOnOneSelect.setOnClickListener(v -> control.setMode(SelectPictureMode.picture));
    }

    @Override
    public void doBusiness() {

    }

    @Override
    public void initView(@Nullable Bundle savedInstanceState, @Nullable View contentView) {
        control = findViewById(R.id.activity_test_rec);
        mBtnModifyMode = findViewById(R.id.activity_test_modify_mode);
        mBtnModifyIsCanDelete = findViewById(R.id.activity_test_modify_is_can_delete);
        mBtnModifyModeOnOneSelect = findViewById(R.id.activity_test_modify_mode_to_on_select);
    }

    @Override
    public int initContentView() {
        return R.layout.activity_test;
    }

}